package demoMod.invincibleOne.patches;

import com.evacipated.cardcrawl.modthespire.lib.SpireInsertPatch;
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
import com.evacipated.cardcrawl.modthespire.lib.SpirePrefixPatch;
import com.evacipated.cardcrawl.modthespire.lib.SpireReturn;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.MonsterGroup;
import com.megacrit.cardcrawl.ui.buttons.EndTurnButton;
import demoMod.invincibleOne.characters.InvincibleOne;

// 不允许手动结束回合。
public class EndTurnPatch {

    @SpirePatch(
            clz = EndTurnButton.class,
            method = "update"
    )
    public static class InsertPatch {
        @SpireInsertPatch(rloc = 78 - 68)
        public static SpireReturn<Void> Insert() {
            if (AbstractDungeon.player instanceof InvincibleOne) {
                return SpireReturn.Return();
            }
            return SpireReturn.Continue();
        }
    }
}
